//00=empty train
//01=file name
//10=file context
//11=hash check

#ifndef TRANSFILE_H
#define TRANSFILE_H

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sendfile.h>
#include <openssl/md5.h> 
#include <stdlib.h>
#define large_file (100*1024*1024)

typedef struct trans_train{
    int type;
    int length;
    char contxt[4096];
}trans_train_t;

int copy_string(const char *source,char *dest);

int init_train(trans_train_t *train);

int trans_file(int sockfd,char *path,char *filename);

int check_hash();


#endif


